extends "../cTDZ/cTDZ.gd"
func _info():
	pass

func _connect():
	._connect()
var fa = null
func _extInit():
	._extInit()
	chaName = "小软泥"
	camp = "软泥怪"
	lv = 1
	attCoe.atkRan = 1
	attCoe.atk = 10 / 8.5 * 2
	attCoe.maxHp = 530 / 112.5
	attCoe.def = 30 / 15.0 / 2
	attCoe.mgiDef = 30 / 16.6 / 2 
	attAdd.spd = 0.5
	atkEff = "atk_dang"
	skillStrs = []
	evos =["cTD1_1"]
	aiOn =true
	addSkillTxt("软泥身躯：物理伤害降低20%，魔法伤害增加35%；普攻附带软泥[身上有3个软泥时，软泥爆炸造成（10 + 60%攻击 + 30%护甲）点魔法伤害，并附加2层<毒>]")

func _onHurt(atkinfo):
	if atkinfo.hurtType == Chara.HurtType.PHY:
		atkinfo.hurtVal *= 0.8
	if atkinfo.hurtType == Chara.HurtType.MGI:
		atkinfo.hurtVal *= 1.35
	._onHurt(atkinfo)

func _onAtkChara(atkinfo):
	if atkinfo.atkType == Chara.AtkType.NORMAL && !atkinfo.isMiss:
		var bf = atkinfo.hitCha.hasBuff("b_rn")
		var cnt = 0
		if !bf:
			atkinfo.hitCha.addBuff(BF.new(1))
			cnt = 1
		else:
			for i in atkinfo.hitCha.buffs:
				if i.id == "b_rn":
					i.cnt += 1
					cnt = i.cnt
					break
		if cnt % 3 == 0 && cnt:
			hurtChara(atkinfo.hitCha,10 + att.atk * 0.6 + att.def * 0.3,Chara.HurtType.MGI,Chara.AtkType.EFF)
			atkinfo.hitCha.addBuff(ctrl.b_d.new(2,12 + att.atk*0.33))
	._onAtkChara(atkinfo)

class BF:
	extends Buff
	var canremove:bool = false
	var cnt
	func _init(lv):
		attInit()
		id = "b_rn"
		self.cnt = lv